package com.wangcanxuan.www.po;

import com.wangcanxuan.www.annotation.orm.Column;
import com.wangcanxuan.www.annotation.orm.PrimaryKey;
import com.wangcanxuan.www.annotation.orm.Table;

/**
 * 用户实体类与数据库user表一一映射
 *
 * @author HHLJ
 * @date 2022/03/15
 */
@Table(tableName = "user")
public class User {
    @PrimaryKey
    @Column(columnName = "id",description = "主键")
    private String id;

    @Column(columnName = "user_name",description = "用户名")
    private String userName;

    @Column(columnName = "password",description = "密码")
    private String password;

    @Column(columnName = "nick_name",description = "用户昵称")
    private String nickName;

    @Column(columnName = "gender",description = "性别")
    private String gender;

    @Column(columnName = "age",description = "年龄")
    private Integer age;

    @Column(columnName = "camp",description = "所属阵营（0为光明，1为黑暗）")
    private Integer camp;

    @Column(columnName = "tribe_id",description = "所属部落id")
    private Integer tribeId;

    @Column(columnName = "coins",description = "金币数")
    private Integer coins;

    @Column(columnName = "likes",description = "点赞数")
    private Integer likes;

    @Column(columnName = "role_id",description = "角色表id")
    private Integer roleId;

    public User() {
    }

    public User(String id, String userName, String password, String nickName, String gender, Integer age, Integer camp, Integer tribeId, Integer coins, Integer likes, Integer roleId) {
        this.id = id;
        this.userName = userName;
        this.password = password;
        this.nickName = nickName;
        this.gender = gender;
        this.age = age;
        this.camp = camp;
        this.tribeId = tribeId;
        this.coins = coins;
        this.likes = likes;
        this.roleId = roleId;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getNickName() {
        return nickName;
    }

    public void setNickName(String nickName) {
        this.nickName = nickName;
    }

    public String getGender() {
        return gender;
    }

    public void setGender(String gender) {
        this.gender = gender;
    }

    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }

    public Integer getCamp() {
        return camp;
    }

    public void setCamp(Integer camp) {
        this.camp = camp;
    }

    public Integer getTribeId() {
        return tribeId;
    }

    public void setTribeId(Integer tribeId) {
        this.tribeId = tribeId;
    }

    public Integer getCoins() {
        return coins;
    }

    public void setCoins(Integer coins) {
        this.coins = coins;
    }

    public Integer getLikes() {
        return likes;
    }

    public void setLikes(Integer likes) {
        this.likes = likes;
    }

    public Integer getRoleId() {
        return roleId;
    }

    public void setRoleId(Integer roleId) {
        this.roleId = roleId;
    }

    @Override
    public String toString() {
        return "User{" +
                "id=" + id +
                ", userName='" + userName + '\'' +
                ", password='" + password + '\'' +
                ", nickName='" + nickName + '\'' +
                ", gender='" + gender + '\'' +
                ", age=" + age +
                ", camp=" + camp +
                ", tribeId=" + tribeId +
                ", coins=" + coins +
                ", likes=" + likes +
                ", roleId=" + roleId +
                '}';
    }
}
